#ifndef ADDDIALOG_H
#define ADDDIALOG_H

#include <QDialog>
#include <QGridLayout>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>

#include "SQLHelper.h"

class AddDialog:public QDialog
{
public:
    AddDialog();
    ~AddDialog();

    void init_view_main();

private:
    QGridLayout *layout_main;   //主布局

    QLabel *label_id;
    QLabel *label_name;
    QLabel *label_author;

    QLineEdit *input_id;
    QLineEdit *input_name;
    QLineEdit *input_author;

    QPushButton *button_add;

    int add_book(QString id, QString name, QString author);
};

#endif // ADDDIALOG_H
